package com.yonyou.cyxdms.basedata.client.service.basedata;

import com.yonyou.cyxdms.basedata.client.domains.vo.CodeVO;
import com.yonyou.cyxdms.basedata.client.domains.vo.DictVO;
import com.yonyou.cyxdms.basedata.client.dto.code.CodeDTO;

import java.util.List;
import java.util.Map;

public interface BaseCommonCodeService {

    List<CodeVO> getCodeListByType(String type);

    /**
     * 不登录通过type获取code
     *
     * @param appId appId
     * @param type type
     * @return java.util.List<com.yonyou.cyxdms.basedata.client.domains.vo.CodeVO>
     * @author renwd
     * @since 2020/1/2
     */
    List<CodeVO> listCodeByType(String appId, String type);

    List<CodeVO> getCodeList();

    public Map<String,Object> insert(CodeDTO codeDTO);

    Map<String, Object> updateCodePO(CodeDTO codeDTO);

    CodeVO getCodeVOByName(String name,Integer type);

    /**
     * 根据codeId查询
     *
     * @param codeId
     * @param appId
     * @return com.yonyou.cyxdms.basedata.client.domains.vo.CodeVO
     * @author dengqiang
     * @since 2019/11/1
     */
    CodeVO queryByCodeId(Long codeId,String appId);

    /**
     * 根据appId查询所有tc_code(pc登录)
     *
     * @param
     * @return com.yonyou.cyx.framework.bean.dto.framework.RestResultResponse<java.util.List<com.yonyou.cyxdms.basedata.client.domains.vo.DictVO>>
     * @author dengqiang
     * @since 2019/11/15
     */
    List<DictVO> allCode();

    List<DictVO> allCodeAvailable();
    
    
    List<CodeVO> getCodeListByType(String type,String appId);

}
